from django.db import models
from django.contrib import admin

# Element which represent any user activity, and can track time for itself
class Activity(models.Model):
    name = models.TextField(max_length = "100")
    
    def __unicode__(self):
        return self.name;
    
class ActivityAdmin(admin.ModelAdmin):
    list_display = ("name",)
    
admin.site.register(Activity, ActivityAdmin)

# main menu items
class MainMenu(models.Model):
    name = models.TextField(max_length="50")
    link = models.TextField(max_length="150")
    
class MainMenuAdmin(admin.ModelAdmin):
    list_display = ("name", "link",)
    
admin.site.register(MainMenu, MainMenuAdmin)

# log work

class DailyWorkLog(models.Model):
    date = models.DateField()
    
class WorkLogItem(models.Model):
    started = models.TimeField()
    ended = models.TimeField()
    # activity = # link to activity